package com.jacap;

import java.util.Calendar;

public class test {
	public static void main(String args[]){
	        Calendar instance = Calendar.getInstance();
	        System.out.println(instance.getTimeInMillis()); //1663990917312
	        System.out.println(instance.getTime()); //Sat Sep 24 11:41:57 CST 2022
	        System.out.println(instance.get(Calendar.YEAR)); // 2022
	        System.out.println(instance.get(Calendar.MONTH)+1); // 9
	        System.out.println(instance.get(Calendar.DATE)); // 24
	        System.out.println(instance.get(Calendar.HOUR_OF_DAY)); //11
	        System.out.println(instance.get(Calendar.MINUTE)); //41 
	        System.out.println(instance.get(Calendar.SECOND)); //57
	    }
}
